// pages/my/my.js
Page({
  data: {
    userInfo: null,
    role: null
  },
  onLoad() {
    const app = getApp();
    this.setData({
      userInfo: app.globalData.userInfo,
      role: app.globalData.role
    });
  },
  logout() {
    wx.clearStorageSync();
    wx.reLaunch({
      url: '/pages/login/login'
    });
  }
})